IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__DatabaseV__versi__19DFD96B]') AND type = 'D')
BEGIN
ALTER TABLE [DatabaseVersion] DROP CONSTRAINT [DF__DatabaseV__versi__19DFD96B]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[DatabaseVersion]') AND type in (N'U'))
DROP TABLE [DatabaseVersion]
GO
CREATE TABLE [DatabaseVersion](
	[version] [int] NOT NULL,
	[versiondate] [datetime] NULL,
	CONSTRAINT [PK_DatabaseVersion] PRIMARY KEY ([version] ASC))

GO

ALTER TABLE [DatabaseVersion] ADD  DEFAULT (getdate()) FOR [versiondate]
GO
INSERT INTO [DatabaseVersion]
           ([version]
           ,[versiondate])
     VALUES
           (2
           ,GETDATE())
GO
